package com.xdtech.hotel.service;

import java.util.List;

import com.xdtech.common.service.IBaseService;
import com.xdtech.hotel.model.Card;
import com.xdtech.hotel.vo.CardItem;
import com.xdtech.hotel.vo.RoomItem;

/**
 * 
 * @author max.zheng
 * @create 2015-04-04 11:11:08
 * @since 1.0
 * @see
 */
public interface CardService extends IBaseService<Card>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2015-04-04 11:11:08
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdateCard(CardItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2015-04-04 11:11:08
	 * @modified by
	 * @param newId
	 * @return
	 */
	CardItem loadCardItem(Long cardId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2015-04-04 11:11:08
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deleteCardInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-04-04 11:11:08
	 * @modified by
	 * @param cardIds
	 */
	boolean deleteCardInfo(List<Long> cardIds);

	/**
	 * 
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-5-7 下午1:33:55
	 * @param cardNo
	 * @return
	 */
	Card getCardByNo(String cardNo);

	/**
	 * 保存卡号到对应房间
	 * @author max.zheng
	 * @create 2015-6-23下午9:34:30
	 * @modified by
	 * @param cardId
	 * @param rooms
	 */
	void saveCardToRooms(Long cardId, List<RoomItem> rooms);
}
